<!--
 * @Author: 卡卡 1071780426@qq.com
 * @Date: 2022-11-02 13:13:25
 * @LastEditors: 卡卡 1071780426@qq.com
 * @LastEditTime: 2023-09-14 16:35:45
 * @FilePath: \backstage - 副本\src\views\aa.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div>
        <el-form :model="form" ref="formData">
            <!-- select用法 -->
            <!-- 调接口，字典项 -->
            <el-form-item label="施工单位" prop="fCompanyname" :label-width="lableWidth">
                <selects v-model="form.aa" typeText="1" defaultText='Piercategory'></selects>
            </el-form-item>

            <!--option为数组包对象 需要返回一个对象，例如字符串、id -->
            <el-form-item label="施工单位" prop="fCompanyname" :label-width="lableWidth">
                <selects v-model="form.bb" typeText="2" :option="option" nodeKey="fItemName" @select="select"
                    :multiple="true"></selects>
            </el-form-item>
            <!-- 简单数组例如 ["是"，"否] -->
            <el-form-item label="施工单位" prop="fCompanyname" :label-width="lableWidth">
                <selects v-model="form.cc" typeText="3" :option="option1"></selects>
            </el-form-item>
            <!-- select用法 -->
            <!-- <div @click="getform">888888</div> -->
        </el-form>


    </div>
</template>
 
<script>
import selects from "@/components/public/el-select.vue"



export default {
    components: {

        selects
    },
    data() {
        return {

            lableWidth: '80px',

            form: {
                aa: "I类",
                bb: [{
                    fCreatedate: 1666079628933,
                    fCreateuserid: null,
                    fCreateusername: null,
                    fDeletemark: 0,
                    fDescription: "",
                    fEnabledmark: 1,
                    fIsdefault: null,
                    fItemcode: null,
                    fItemdetailid: "3fae6645-8af6-402a-bd94-a45da4ba5ca4",
                    fItemid: "4c20f5d8-29ad-409d-88c1-8f54de698167",
                    fItemname: "I类",
                    fItemvalue: "I类",
                    fModifydate: null,
                    fModifyuserid: null,
                    fModifyusername: null,
                    fParentid: null,
                    fQuickquery: null,
                    fSimplespelling: null,
                    fSortcode: 1,
                    userId: null,
                    userName: null
                }],
                // bb: "36",
                cc: "66"
            },
            option1: ["3", "4", "5", "6"],
            option: [
                {
                    fCreatedate: 1666079628933,
                    fCreateuserid
                        :
                        null,
                    fCreateusername
                        :
                        null,
                    fDeletemark
                        :
                        0,
                    fDescription
                        :
                        "",
                    fEnabledmark
                        :
                        1,
                    fIsdefault
                        :
                        null,
                    fItemcode
                        :
                        null,
                    fItemdetailid
                        :
                        "3fae6645-8af6-402a-bd94-a45da4ba5ca4",
                    fItemid
                        :
                        "4c20f5d8-29ad-409d-88c1-8f54de698167",
                    fItemName
                        :
                        "I3类",
                    fItemvalue
                        :
                        "I类",
                    fModifydate
                        :
                        null,
                    fModifyuserid
                        :
                        null,
                    fModifyusername
                        :
                        null,
                    fParentid
                        :
                        null,
                    fQuickquery
                        :
                        null,
                    fSimplespelling
                        :
                        null,
                    fSortcode
                        :
                        1,
                    userId
                        :
                        null,
                    userName
                        :
                        null,
                    fId: 0
                },
                {
                    fCreatedate: 1666079628933,
                    fCreateuserid
                        :
                        null,
                    fCreateusername
                        :
                        null,
                    fDeletemark
                        :
                        0,
                    fDescription
                        :
                        "",
                    fEnabledmark
                        :
                        1,
                    fIsdefault
                        :
                        null,
                    fItemcode
                        :
                        null,
                    fItemdetailid
                        :
                        "3fae6645-8af6-402a-bd94-a454da4ba5ca4",
                    fItemid
                        :
                        "4c20f5d8-29ad-409d-88c1-8f54d4e698167",
                    fItemName
                        :
                        "I4类",
                    fItemvalue
                        :
                        "I5类",
                    fModifydate
                        :
                        null,
                    fModifyuserid
                        :
                        null,
                    fModifyusername
                        :
                        null,
                    fParentid
                        :
                        null,
                    fQuickquery
                        :
                        null,
                    fSimplespelling
                        :
                        null,
                    fSortcode
                        :
                        1,
                    userId
                        :
                        null,
                    userName
                        :
                        null,
                    fId: 0
                }
            ],//检测类型 - 根据当前登录用户获取检测类型
        };
    },


    methods: {
        select(e) {
            this.form.bb = e.fItemName
            console.log(e);
        },
        getform() {
            console.log(this.form);
        }

    }
}
</script>
 
<style lang="less" scoped></style>
